package com.chapter01exercise.homework09;

/**
 * @Author 小闽
 * @Date 2024/8/17 17:21
 * @PackageName: com.chapter01exercise.homework09
 * @ClassName: LabeledPoint
 * @Description: 子类
 * @Version 1.0
 */
public class LabeledPoint extends Point {
    private String tagged_value;
    /**
     * 构造器
     * @param x
     * @param y
     * @param tagged_value
     */
    public LabeledPoint(int x, double y, String tagged_value) {
        super(x, y);
        this.tagged_value = tagged_value;
    }
    /**
     * 打印坐标的内容值
     */
    public void printPoint(){
        System.out.println("x的坐标为：" + getX() + "\n" + "y的坐标为：" + getY() + "\n" + "标签值为：" + tagged_value);
    }
}
